﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>GetLayerByUrl</title>
    <script src="../../lib/XiaoFuMap.js" type="text/javascript"></script>
    <script type="text/javascript">
        
        var map;
        function load() {   
            $.ajax({
                url: "../../data.js",
                dataType: "json",
                success: function (data) {
                    map = new XiaoFu.Map("#MapContainer");
                    var layer = new XiaoFu.ArcGISCacheLayer(data);
                    layer.serverUrl = "http://192.168.0.23/arcgiscache/SeverTest_jilin_0041/Layers/_alllayers/";
                    layer.picFormat = "png";
                    map.addLayer(layer);
                    map.panend = function (geo) {
                        var center = map.getCenter();
                        showMsg(center.x + "_" + center.y);
                    }
                }
            });
            $.ajax(
                {
                    url: "http://192.168.1.170/Xiaofu.Server.Web/query.ashx?method=QueryBySQL&outFields=gid&layerName=bjilin_polyline&where=gid>0",
                    dataType: "jsonp",
                    success: function (data) {
                        var t = eval("("+data.Message+")") ;
                    }
                }
            );
        }
     
    </script>
</head>
<body onload="load()">
    <div id="MapContainer" style="z-index: 10000; border: 1px solid blue; position: relative;
        width: 1000px; height: 500px;">
    </div>  
    <div id="msg">
    </div>
</body>
</html>
